home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HPAVC
/
HPAVC CD-ROM.iso
/
ASMVLA00.ZIP
/
ASM1.ASM
< prev
next >
Wrap
Assembly Source File
|
1993-03-21
|
831b
|
25 lines
DOSSEG
.MODEL SMALL
.STACK 200h
.DATA
Message db "This was printed using function 9 "
db "of the DOS interrupt 21h.$"
.CODE
START:
mov ax,seg Message ;moves the SEGMENT that `Message' is in into AX
mov ds,ax ;moves ax into ds (ds=ax)
;you cannot do this -> mov ds,seg Message
mov dx,offset Message ;move the OFFSET of `Message' into DX
mov ah,9 ;Function 9 of DOS interupt 21h prints a string that
int 21h ;terminates with a "$". It requires a FAR pointer to
;what is to be printed in DS:DX
mov ax,4c00h ;Returns control to DOS
int 21h ;MUST be here! Program will crash without it!
END START